package com.ruoyi.spot.realtime.ticker.service.impl;

import java.util.List;

import com.ruoyi.spot.realtime.ticker.domain.VO.SpotTickerRealtimeDataVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.spot.realtime.ticker.mapper.SpotTickerRealtimeDataMapper;
import com.ruoyi.spot.realtime.ticker.domain.SpotTickerRealtimeData;
import com.ruoyi.spot.realtime.ticker.service.ISpotTickerRealtimeDataService;

/**
 * 实时TickerService业务层处理
 * 
 * @author saumell
 * @date 2024-08-03
 */
@Service
public class SpotTickerRealtimeDataServiceImpl implements ISpotTickerRealtimeDataService 
{
    @Autowired
    private SpotTickerRealtimeDataMapper spotTickerRealtimeDataMapper;

    /**
     * 查询实时Ticker
     * 
     * @param id 实时Ticker主键
     * @return 实时Ticker
     */
    @Override
    public SpotTickerRealtimeDataVO selectSpotTickerRealtimeDataById(Integer id)
    {
        return spotTickerRealtimeDataMapper.selectSpotTickerRealtimeDataById(id);
    }

    /**
     * 查询实时Ticker列表
     * 
     * @param spotTickerRealtimeData 实时Ticker
     * @return 实时Ticker
     */
    @Override
    public List<SpotTickerRealtimeDataVO> selectSpotTickerRealtimeDataList(SpotTickerRealtimeDataVO spotTickerRealtimeData)
    {
        return spotTickerRealtimeDataMapper.selectSpotTickerRealtimeDataList(spotTickerRealtimeData);
    }

    /**
     * 新增实时Ticker
     * 
     * @param spotTickerRealtimeData 实时Ticker
     * @return 结果
     */
    @Override
    public int insertSpotTickerRealtimeData(SpotTickerRealtimeData spotTickerRealtimeData)
    {
        return spotTickerRealtimeDataMapper.insertSpotTickerRealtimeData(spotTickerRealtimeData);
    }

    /**
     * 修改实时Ticker
     * 
     * @param spotTickerRealtimeData 实时Ticker
     * @return 结果
     */
    @Override
    public int updateSpotTickerRealtimeData(SpotTickerRealtimeData spotTickerRealtimeData)
    {
        return spotTickerRealtimeDataMapper.updateSpotTickerRealtimeData(spotTickerRealtimeData);
    }

    /**
     * 批量删除实时Ticker
     * 
     * @param ids 需要删除的实时Ticker主键
     * @return 结果
     */
    @Override
    public int deleteSpotTickerRealtimeDataByIds(Integer[] ids)
    {
        return spotTickerRealtimeDataMapper.deleteSpotTickerRealtimeDataByIds(ids);
    }

    /**
     * 删除实时Ticker信息
     * 
     * @param id 实时Ticker主键
     * @return 结果
     */
    @Override
    public int deleteSpotTickerRealtimeDataById(Integer id)
    {
        return spotTickerRealtimeDataMapper.deleteSpotTickerRealtimeDataById(id);
    }

    @Override
    public List<SpotTickerRealtimeDataVO> selectSpotAllData() {
        return spotTickerRealtimeDataMapper.selectSpotAllData();
    }

    @Override
    public Integer queryCurryNumber(String currencyPair) {
        return spotTickerRealtimeDataMapper.queryCurryNumber(currencyPair);
    }
}
